<template>
    <div class="orderForm">
      <el-table v-loading="pageLoading" :data="pageVO.list" border fit highlight-current-row style="width: 100%">
        <el-table-column prop="number" label="吧台编号"></el-table-column>
        <el-table-column prop="region" label="投放区域"></el-table-column>
        <el-table-column prop="orderId" label="订单编号"> </el-table-column>
        <el-table-column prop="spuName" label="订单商品"></el-table-column>
        <el-table-column prop="spuTotalAmount" label="实付款"></el-table-column>
        <el-table-column prop="createTime" label="创建时间"></el-table-column>
        <el-table-column prop="status" label="状态">
          <template slot-scope="{ row }">
            <span v-if="row.status == 1">待付款</span>
            <span v-if="row.status == 2">待发货</span>
            <span v-if="row.status == 3">待收货(已发货)</span>
            <span v-if="row.status == 5">成功</span>
            <span v-if="row.status == 6">取消支付</span>
          </template>
        </el-table-column>
      </el-table>
      <!-- 分页条 -->
      <pagination
        v-show="pageVO.total > 0"
        :total="pageVO.total"
        :page.sync="pageQuery.pageNum"
        :limit.sync="pageQuery.pageSize"
        @pagination="getPage()"
      />
    </div>
  </template>
  
  <script>
  import * as api from "@/api/investor/index";
  import Pagination from "@/components/Pagination";
  export default {
    components: { Pagination },
    data() {
      return {
        pageLoading: false,
        pageQuery: {
          pageSize: 10,
          pageNum: 1,
          investorId:null,
        },
        // 返回参数
        pageVO: {
          list: [], // 返回的列表
          total: 0, // 一共多少条数据
          pages: 0, // 一共多少页
        },
      }
    },
    mounted() {
    this.pageQuery.barCounterInvestorId=this.$route.query.barCounterInvestorId
    this.getPage()
  },
    methods: {
      getPage() {
        this.pageLoading = true
        api.getBarCounterinvestorOrderList(this.pageQuery).then(pageVO=> {
          this.pageVO = pageVO;
        })
        this.pageLoading = false;
      }
    }
  }
</script>
  
  <style lang="scss" scoped>
   ::v-deep .red-header .el-table__header th {
    background-color: rgb(242, 243, 245);
    color: #000; /* 可选：为了确保文字颜色与背景对比度良好，可以设置文本颜色为白色 */
  }
  </style>